home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / ColorSync 2.6 Mac SDK / Interfaces / CMApplication.a next >
Encoding:
Text File  |  1999-05-07  |  61.4 KB  |  2,116 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.6
  7. ;                Release:    ColorSync 2.6 SDK for use with Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1992, 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  18. __CMAPPLICATION__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  24.     include 'Quickdraw.a'
  25.     ENDIF
  26.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  27.     include 'Files.a'
  28.     ENDIF
  29.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  30.     include 'Printing.a'
  31.     ENDIF
  32.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  33.     include 'CMICCProfile.a'
  34.     ENDIF
  35.     IF &TYPE('__DISPLAYS__') = 'UNDEFINED' THEN
  36.     include 'Displays.a'
  37.     ENDIF
  38.  
  39.  
  40. kDefaultCMMSignature            EQU        'appl'
  41. ;  Macintosh 68K trap word 
  42.  
  43. cmTrap                            EQU        $ABEE
  44.  
  45. ;  PicComment IDs 
  46.  
  47. cmBeginProfile                    EQU        220
  48. cmEndProfile                    EQU        221
  49. cmEnableMatching                EQU        222
  50. cmDisableMatching                EQU        223
  51. cmComment                        EQU        224
  52. ;  PicComment selectors for cmComment 
  53.  
  54. cmBeginProfileSel                EQU        0
  55. cmContinueProfileSel            EQU        1
  56. cmEndProfileSel                    EQU        2
  57. cmProfileIdentifierSel            EQU        3
  58.  
  59. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  60.  
  61. cmMatchCMMType                    EQU        $00000001
  62. cmMatchApplProfileVersion        EQU        $00000002
  63. cmMatchDataType                    EQU        $00000004
  64. cmMatchDeviceType                EQU        $00000008
  65. cmMatchDeviceManufacturer        EQU        $00000010
  66. cmMatchDeviceModel                EQU        $00000020
  67. cmMatchDeviceAttributes            EQU        $00000040
  68. cmMatchFlags                    EQU        $00000080
  69. cmMatchOptions                    EQU        $00000100
  70. cmMatchWhite                    EQU        $00000200
  71. cmMatchBlack                    EQU        $00000400
  72. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  73.  
  74. cmMatchAnyProfile                EQU        $00000000
  75. cmMatchProfileCMMType            EQU        $00000001
  76. cmMatchProfileClass                EQU        $00000002
  77. cmMatchDataColorSpace            EQU        $00000004
  78. cmMatchProfileConnectionSpace    EQU        $00000008
  79. cmMatchManufacturer                EQU        $00000010
  80. cmMatchModel                    EQU        $00000020
  81. cmMatchAttributes                EQU        $00000040
  82. cmMatchProfileFlags                EQU        $00000080
  83. ;  Result codes 
  84.  
  85.                                                             ; General Errors 
  86. cmProfileError                    EQU        -170
  87. cmMethodError                    EQU        -171
  88. cmMethodNotFound                EQU        -175                ; CMM not present 
  89. cmProfileNotFound                EQU        -176                ; Responder error 
  90. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  91. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  92. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  93. cmCantDeleteProfile                EQU        -180                ; Responder error 
  94. cmUnsupportedDataType            EQU        -181                ; Responder error 
  95. cmNoCurrentProfile                EQU        -182                ; Responder error 
  96.                                                             ; Profile Access Errors 
  97. cmElementTagNotFound            EQU        -4200
  98. cmIndexRangeErr                    EQU        -4201                ; Tag index out of range 
  99. cmCantDeleteElement                EQU        -4202
  100. cmFatalProfileErr                EQU        -4203
  101. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  102. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  103. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  104.                                                             ; Profile Search Errors 
  105. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  106. cmSearchError                    EQU        -4207
  107. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  108. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  109. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  110. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  111. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  112. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  113. cmRangeOverFlow                    EQU        -4214                ; Color conversion warning that some output color values over/underflowed and were clipped 
  114. cmNamedColorNotFound            EQU        -4216                ; NamedColor not found 
  115. cmCantGamutCheckError            EQU        -4217                ; Gammut checking not supported by this ColorWorld 
  116. ;  deviceType values for ColorSync 1.0 Device Profile access 
  117.  
  118. cmSystemDevice                    EQU        'sys '
  119. cmGDevice                        EQU        'gdev'
  120. ;  Commands for CMFlattenUPP(…) 
  121.  
  122. cmOpenReadSpool                    EQU        1
  123. cmOpenWriteSpool                EQU        2
  124. cmReadSpool                        EQU        3
  125. cmWriteSpool                    EQU        4
  126. cmCloseSpool                    EQU        5
  127. ;  Flags for PostScript-related functions 
  128.  
  129. cmPS7bit                        EQU        1
  130. cmPS8bit                        EQU        2
  131. ;  Flags for profile embedding functions 
  132.  
  133. cmEmbedWholeProfile                EQU        $00000000
  134. cmEmbedProfileIdentifier        EQU        $00000001
  135. ;  Commands for CMAccessUPP(…) 
  136.  
  137. cmOpenReadAccess                EQU        1
  138. cmOpenWriteAccess                EQU        2
  139. cmReadAccess                    EQU        3
  140. cmWriteAccess                    EQU        4
  141. cmCloseAccess                    EQU        5
  142. cmCreateNewAccess                EQU        6
  143. cmAbortWriteAccess                EQU        7
  144. cmBeginAccess                    EQU        8
  145. cmEndAccess                        EQU        9
  146.  
  147. ;  Abstract data type for memory-based Profile 
  148.  
  149.  
  150. ;  Abstract data type for Profile search result 
  151.  
  152.  
  153. ;  Abstract data type for BeginMatching(…) reference 
  154.  
  155.  
  156. ;  Abstract data type for ColorWorld reference 
  157.  
  158.  
  159. ;  Caller-supplied flatten function 
  160. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  161. ;  Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines 
  162. ;  Caller-supplied filter function for Profile search 
  163. ;  Caller-supplied function for profile access 
  164. ; typedef long                             CMError
  165.  
  166. ;  For 1.0 and 2.0 profile header variants 
  167. ;  CMAppleProfileHeader 
  168. CMAppleProfileHeader    RECORD 0
  169. cm1                         ds        CMHeader        ; offset: $0 (0)
  170.                          ORG 0
  171. cm2                         ds        CM2Header        ; offset: $0 (0)
  172. sizeof                     EQU *                    ; size:   $80 (128)
  173.                         ENDR
  174. ;  Param for CWConcatColorWorld(…) 
  175. CMConcatProfileSet        RECORD 0
  176. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  177. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  178. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  179. sizeof                     EQU *                    ; size:   $8 (8)
  180.                         ENDR
  181.  
  182. ;  NCMConcatProfileSpec Tags 
  183.  
  184. kNoTransform                    EQU        0                    ; Not used 
  185. kUseAtoB                        EQU        1                    ; Use 'A2B*' tag from this profile or equivalent 
  186. kUseBtoA                        EQU        2                    ; Use 'B2A*' tag from this profile or equivalent 
  187. kUseBtoB                        EQU        3                    ; Use 'pre*' tag from this profile or equivalent 
  188.                                                             ; For typical device profiles the following synonyms may be useful 
  189. kDeviceToPCS                    EQU        1                    ; Device Dependent to Device Independent 
  190. kPCSToDevice                    EQU        2                    ; Device Independent to Device Dependent 
  191. kPCSToPCS                        EQU        3                    ; Independent, through device's gamut 
  192. kUseProfileIntent                EQU        $FFFFFFFF            ; For renderingIntent in NCMConcatProfileSpec    
  193. ;  NCMConcatProfileSpec 
  194. NCMConcatProfileSpec    RECORD 0
  195. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  renderingIntent override        
  196. transformTag             ds.l    1                ; offset: $4 (4)        ;  transformTag, defined above    
  197. profile                     ds.l    1                ; offset: $8 (8)        ;  profile 
  198. sizeof                     EQU *                    ; size:   $C (12)
  199.                         ENDR
  200. ;  NCMConcatProfileSet 
  201. NCMConcatProfileSet        RECORD 0
  202. cmm                         ds.l    1                ; offset: $0 (0)        ;  e.g. 'KCMS', 'appl', ...  uniquely ids the cmm, or 0000 
  203. flags                     ds.l    1                ; offset: $4 (4)        ;  specify quality, lookup only, no gamut checking ... 
  204. flagsMask                 ds.l    1                ; offset: $8 (8)        ;  which bits of 'flags' to use to override profile 
  205. profileCount             ds.l    1                ; offset: $C (12)        ;  how many ProfileSpecs in the following set 
  206. profileSpecs             ds        NCMConcatProfileSpec ; offset: $10 (16) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  207. sizeof                     EQU *                    ; size:   $1C (28)
  208.                         ENDR
  209. ;  ColorSync color data types 
  210. CMRGBColor                RECORD 0
  211. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  212. green                     ds.w    1                ; offset: $2 (2)
  213. blue                     ds.w    1                ; offset: $4 (4)
  214. sizeof                     EQU *                    ; size:   $6 (6)
  215.                         ENDR
  216. CMCMYKColor                RECORD 0
  217. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  218. magenta                     ds.w    1                ; offset: $2 (2)
  219. yellow                     ds.w    1                ; offset: $4 (4)
  220. black                     ds.w    1                ; offset: $6 (6)
  221. sizeof                     EQU *                    ; size:   $8 (8)
  222.                         ENDR
  223. CMCMYColor                RECORD 0
  224. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  225. magenta                     ds.w    1                ; offset: $2 (2)
  226. yellow                     ds.w    1                ; offset: $4 (4)
  227. sizeof                     EQU *                    ; size:   $6 (6)
  228.                         ENDR
  229. CMHLSColor                RECORD 0
  230. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  231. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  232. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  233. sizeof                     EQU *                    ; size:   $6 (6)
  234.                         ENDR
  235. CMHSVColor                RECORD 0
  236. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  237. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  238. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  239. sizeof                     EQU *                    ; size:   $6 (6)
  240.                         ENDR
  241. CMLabColor                RECORD 0
  242. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  243. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  244. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  245. sizeof                     EQU *                    ; size:   $6 (6)
  246.                         ENDR
  247. CMLuvColor                RECORD 0
  248. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  249. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  250. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  251. sizeof                     EQU *                    ; size:   $6 (6)
  252.                         ENDR
  253. CMYxyColor                RECORD 0
  254. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  255. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  256. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  257. sizeof                     EQU *                    ; size:   $6 (6)
  258.                         ENDR
  259. CMGrayColor                RECORD 0
  260. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  261. sizeof                     EQU *                    ; size:   $2 (2)
  262.                         ENDR
  263. CMMultichannel5Color    RECORD 0
  264. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  265.                          ORG 6
  266. sizeof                     EQU *                    ; size:   $6 (6)
  267.                         ENDR
  268. CMMultichannel6Color    RECORD 0
  269. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  270. sizeof                     EQU *                    ; size:   $6 (6)
  271.                         ENDR
  272. CMMultichannel7Color    RECORD 0
  273. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  274.                          ORG 8
  275. sizeof                     EQU *                    ; size:   $8 (8)
  276.                         ENDR
  277. CMMultichannel8Color    RECORD 0
  278. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  279. sizeof                     EQU *                    ; size:   $8 (8)
  280.                         ENDR
  281. CMNamedColor            RECORD 0
  282. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  283. sizeof                     EQU *                    ; size:   $4 (4)
  284.                         ENDR
  285. CMColor                    RECORD 0
  286. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  287.                          ORG 0
  288. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  289.                          ORG 0
  290. hls                         ds        CMHLSColor        ; offset: $0 (0)
  291.                          ORG 0
  292. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  293.                          ORG 0
  294. Lab                         ds        CMLabColor        ; offset: $0 (0)
  295.                          ORG 0
  296. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  297.                          ORG 0
  298. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  299.                          ORG 0
  300. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  301.                          ORG 0
  302. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  303.                          ORG 0
  304. gray                     ds        CMGrayColor        ; offset: $0 (0)
  305.                          ORG 0
  306. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  307.                          ORG 0
  308. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  309.                          ORG 0
  310. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  311.                          ORG 0
  312. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  313.                          ORG 0
  314. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  315.                          ORG 8
  316. sizeof                     EQU *                    ; size:   $8 (8)
  317.                         ENDR
  318. CMProfileSearchRecord    RECORD 0
  319. header                     ds        CMHeader        ; offset: $0 (0)
  320. fieldMask                 ds.l    1                ; offset: $40 (64)
  321. reserved                 ds.l    2                ; offset: $44 (68)
  322. sizeof                     EQU *                    ; size:   $4C (76)
  323.                         ENDR
  324. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  325.  
  326. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  327.  
  328. ;  Search definition for 2.0 
  329. CMSearchRecord            RECORD 0
  330. CMMType                     ds.l    1                ; offset: $0 (0)
  331. profileClass             ds.l    1                ; offset: $4 (4)
  332. dataColorSpace             ds.l    1                ; offset: $8 (8)
  333. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  334. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  335. deviceModel                 ds.l    1                ; offset: $14 (20)
  336. deviceAttributes         ds.l    2                ; offset: $18 (24)
  337. profileFlags             ds.l    1                ; offset: $20 (32)
  338. searchMask                 ds.l    1                ; offset: $24 (36)
  339. filter                     ds.l    1                ; offset: $28 (40)
  340. sizeof                     EQU *                    ; size:   $2C (44)
  341.                         ENDR
  342. ;  CMMInfo structure 
  343. CMMInfo                    RECORD 0
  344. dataSize                 ds.l    1                ; offset: $0 (0)        ;  Size of this structure - compatibility
  345. CMMType                     ds.l    1                ; offset: $4 (4)        ;  Signature, e.g. 'KCMS'
  346. CMMMfr                     ds.l    1                ; offset: $8 (8)        ;  Vendor, e.g. 'appl'
  347. CMMVersion                 ds.l    1                ; offset: $C (12)        ;  cmm version number
  348. ASCIIName                 ds.b    32                ; offset: $10 (16)        ;  pascal string - name
  349. ASCIIDesc                 ds.b    256                ; offset: $30 (48)        ;  pascal string - description or copyright
  350. UniCodeNameCount         ds.l    1                ; offset: $130 (304)    ;  count of UniChars in following array
  351. UniCodeName                 ds.w    32                ; offset: $134 (308)    ;  the name in UniCode chars
  352. UniCodeDescCount         ds.l    1                ; offset: $174 (372)    ;  count of UniChars in following array
  353. UniCodeDesc                 ds.w    256                ; offset: $178 (376)    ;  the description in UniCode chars
  354. sizeof                     EQU *                    ; size:   $378 (888)
  355.                         ENDR
  356. ;  GetCWInfo structures 
  357. CMMInfoRecord            RECORD 0
  358. CMMType                     ds.l    1                ; offset: $0 (0)
  359. CMMVersion                 ds.l    1                ; offset: $4 (4)
  360. sizeof                     EQU *                    ; size:   $8 (8)
  361.                         ENDR
  362. CMCWInfoRecord            RECORD 0
  363. cmmCount                 ds.l    1                ; offset: $0 (0)
  364. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  365. sizeof                     EQU *                    ; size:   $14 (20)
  366.                         ENDR
  367. ;  profile identifier structures 
  368. CMProfileIdentifier        RECORD 0
  369. profileHeader             ds        CM2Header        ; offset: $0 (0)
  370. calibrationDate             ds        CMDateTime        ; offset: $80 (128)
  371. ASCIIProfileDescriptionLen  ds.l 1                ; offset: $8C (140)
  372. ASCIIProfileDescription     ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  variable length 
  373.                          ORG 146
  374. sizeof                     EQU *                    ; size:   $92 (146)
  375.                         ENDR
  376. ; typedef struct CMProfileIdentifier *    CMProfileIdentifierPtr
  377.  
  378. ;  packing formats 
  379.  
  380. cmNoColorPacking                EQU        $0000
  381. cmWord5ColorPacking                EQU        $0500
  382. cmWord565ColorPacking            EQU        $0600
  383. cmLong8ColorPacking                EQU        $0800
  384. cmLong10ColorPacking            EQU        $0A00
  385. cmAlphaFirstPacking                EQU        $1000
  386. cmOneBitDirectPacking            EQU        $0B00
  387. cmAlphaLastPacking                EQU        $0000
  388. cm8_8ColorPacking                EQU        $2800
  389. cm16_8ColorPacking                EQU        $2000
  390. cm24_8ColorPacking                EQU        $2100
  391. cm32_8ColorPacking                EQU        $0800
  392. cm40_8ColorPacking                EQU        $2200
  393. cm48_8ColorPacking                EQU        $2300
  394. cm56_8ColorPacking                EQU        $2400
  395. cm64_8ColorPacking                EQU        $2500
  396. cm32_16ColorPacking                EQU        $2600
  397. cm48_16ColorPacking                EQU        $2900
  398. cm64_16ColorPacking                EQU        $2A00
  399. cm32_32ColorPacking                EQU        $2700
  400. cmLittleEndianPacking            EQU        $4000
  401. cmReverseChannelPacking            EQU        $8000
  402. ;  general colorspaces 
  403.  
  404. cmNoSpace                        EQU        0
  405. cmRGBSpace                        EQU        1
  406. cmCMYKSpace                        EQU        2
  407. cmHSVSpace                        EQU        3
  408. cmHLSSpace                        EQU        4
  409. cmYXYSpace                        EQU        5
  410. cmXYZSpace                        EQU        6
  411. cmLUVSpace                        EQU        7
  412. cmLABSpace                        EQU        8
  413. cmReservedSpace1                EQU        9
  414. cmGraySpace                        EQU        10
  415. cmReservedSpace2                EQU        11
  416. cmGamutResultSpace                EQU        12
  417. cmNamedIndexedSpace                EQU        16
  418. cmMCFiveSpace                    EQU        17
  419. cmMCSixSpace                    EQU        18
  420. cmMCSevenSpace                    EQU        19
  421. cmMCEightSpace                    EQU        20
  422. cmAlphaSpace                    EQU        $80
  423. cmRGBASpace                        EQU        129
  424. cmGrayASpace                    EQU        138
  425. ;  supported CMBitmapColorSpaces - Each of the following is a 
  426. ;  combination of a general colospace and a packing formats. 
  427. ;  Each can also be or'd with cmReverseChannelPacking. 
  428.  
  429. cmGray8Space                    EQU        10250
  430. cmGrayA16Space                    EQU        8330
  431. cmGray16Space                    EQU        10
  432. cmGrayA32Space                    EQU        138
  433. cmGray16LSpace                    EQU        16394
  434. cmGrayA32LSpace                    EQU        16522
  435. cmRGB16Space                    EQU        1281
  436. cmRGB16LSpace                    EQU        17665
  437. cmRGB565Space                    EQU        1537
  438. cmRGB565LSpace                    EQU        17921
  439. cmRGB24Space                    EQU        8449
  440. cmRGB32Space                    EQU        2049
  441. cmRGB48Space                    EQU        10497
  442. cmRGB48LSpace                    EQU        26881
  443. cmARGB32Space                    EQU        6273
  444. cmARGB64Space                    EQU        14977
  445. cmARGB64LSpace                    EQU        31361
  446. cmRGBA32Space                    EQU        2177
  447. cmRGBA64Space                    EQU        10881
  448. cmRGBA64LSpace                    EQU        27265
  449. cmCMYK32Space                    EQU        2050
  450. cmCMYK64Space                    EQU        10754
  451. cmCMYK64LSpace                    EQU        27138
  452. cmHSV32Space                    EQU        2563
  453. cmHLS32Space                    EQU        2564
  454. cmYXY32Space                    EQU        2565
  455. cmXYZ24Space                    EQU        8454
  456. cmXYZ32Space                    EQU        2566
  457. cmXYZ48Space                    EQU        10502
  458. cmXYZ48LSpace                    EQU        26886
  459. cmLUV32Space                    EQU        2567
  460. cmLAB24Space                    EQU        8456
  461. cmLAB32Space                    EQU        2568
  462. cmLAB48Space                    EQU        10504
  463. cmLAB48LSpace                    EQU        26888
  464. cmGamutResult1Space                EQU        $0B0C
  465. cmNamedIndexed32Space            EQU        $2710
  466. cmNamedIndexed32LSpace            EQU        $6710
  467. cmMCFive8Space                    EQU        $2211
  468. cmMCSix8Space                    EQU        $2312
  469. cmMCSeven8Space                    EQU        $2413
  470. cmMCEight8Space                    EQU        $2514
  471.  
  472. ; typedef UInt32                         CMBitmapColorSpace
  473.  
  474. CMBitmap                RECORD 0
  475. image                     ds.l    1                ; offset: $0 (0)
  476. width                     ds.l    1                ; offset: $4 (4)
  477. height                     ds.l    1                ; offset: $8 (8)
  478. rowBytes                 ds.l    1                ; offset: $C (12)
  479. pixelSize                 ds.l    1                ; offset: $10 (16)
  480. space                     ds.l    1                ; offset: $14 (20)
  481. user1                     ds.l    1                ; offset: $18 (24)
  482. user2                     ds.l    1                ; offset: $1C (28)
  483. sizeof                     EQU *                    ; size:   $20 (32)
  484.                         ENDR
  485.  
  486. ;  Classic Print Manager Stuff 
  487.     IF TARGET_OS_MAC THEN
  488.  
  489. enableColorMatchingOp            EQU        12
  490. registerProfileOp                EQU        13
  491.     ENDIF    ; TARGET_OS_MAC
  492. ;  Profile Locations 
  493.  
  494. CS_MAX_PATH                        EQU        256
  495.  
  496. cmNoProfileBase                    EQU        0
  497. cmFileBasedProfile                EQU        1
  498. cmHandleBasedProfile            EQU        2
  499. cmPtrBasedProfile                EQU        3
  500. cmProcedureBasedProfile            EQU        4
  501. cmPathBasedProfile                EQU        5
  502. cmBufferBasedProfile            EQU        6
  503. CMFileLocation            RECORD 0
  504. spec                     ds        FSSpec            ; offset: $0 (0)
  505. sizeof                     EQU *                    ; size:   $46 (70)
  506.                         ENDR
  507. CMHandleLocation        RECORD 0
  508. h                         ds.l    1                ; offset: $0 (0)
  509. sizeof                     EQU *                    ; size:   $4 (4)
  510.                         ENDR
  511. CMPtrLocation            RECORD 0
  512. p                         ds.l    1                ; offset: $0 (0)
  513. sizeof                     EQU *                    ; size:   $4 (4)
  514.                         ENDR
  515. CMProcedureLocation        RECORD 0
  516. proc                     ds.l    1                ; offset: $0 (0)
  517. refCon                     ds.l    1                ; offset: $4 (4)
  518. sizeof                     EQU *                    ; size:   $8 (8)
  519.                         ENDR
  520. CMPathLocation            RECORD 0
  521. path                     ds.b    256                ; offset: $0 (0)
  522. sizeof                     EQU *                    ; size:   $100 (256)
  523.                         ENDR
  524. CMBufferLocation        RECORD 0
  525. buffer                     ds.l    1                ; offset: $0 (0)
  526. size                     ds.l    1                ; offset: $4 (4)
  527. sizeof                     EQU *                    ; size:   $8 (8)
  528.                         ENDR
  529. CMProfLoc                RECORD 0
  530. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  531.                          ORG 0
  532. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  533.                          ORG 0
  534. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  535.                          ORG 0
  536. procLoc                     ds        CMProcedureLocation ; offset: $0 (0)
  537.                          ORG 0
  538. pathLoc                     ds        CMPathLocation ; offset: $0 (0)
  539.                          ORG 0
  540. bufferLoc                 ds        CMBufferLocation ; offset: $0 (0)
  541.                          ORG 256
  542. sizeof                     EQU *                    ; size:   $100 (256)
  543.                         ENDR
  544. CMProfileLocation        RECORD 0
  545. locType                     ds.w    1                ; offset: $0 (0)
  546. u                         ds        CMProfLoc        ; offset: $2 (2)
  547. sizeof                     EQU *                    ; size:   $102 (258)
  548.                         ENDR
  549.     IF TARGET_OS_MAC THEN
  550.  
  551. cmOriginalProfileLocationSize    EQU        72
  552. cmCurrentProfileLocationSize    EQU        258
  553.     ELSE
  554.  
  555. cmOriginalProfileLocationSize    EQU        258
  556. cmCurrentProfileLocationSize    EQU        258
  557.     ENDIF    ; TARGET_OS_MAC
  558. ;  Struct and enums used for Profile iteration 
  559.  
  560. cmProfileIterateDataVersion1    EQU        $00010000
  561. cmProfileIterateDataVersion2    EQU        $00020000
  562. CMProfileIterateData    RECORD 0
  563. dataVersion                 ds.l    1                ; offset: $0 (0)        ;  cmProfileIterateDataVersion2 
  564. header                     ds        CM2Header        ; offset: $4 (4)
  565. code                     ds.w    1                ; offset: $84 (132)
  566. name                     ds        Str255            ; offset: $86 (134)
  567. location                 ds        CMProfileLocation ; offset: $186 (390)
  568. uniCodeNameCount         ds.l    1                ; offset: $288 (648)
  569. uniCodeName                 ds.l    1                ; offset: $28C (652)
  570. asciiName                 ds.l    1                ; offset: $290 (656)
  571. makeAndModel             ds.l    1                ; offset: $294 (660)
  572. sizeof                     EQU *                    ; size:   $298 (664)
  573.                         ENDR
  574. ;  Caller-supplied callback function for Profile & CMM iteration 
  575. ;  Profile file and element access 
  576. ;
  577. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  578. ;
  579.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  580.         Macro
  581.         _CMNewProfile
  582.             move.l              #$0008001B,D0
  583.             dc.w                $ABEE
  584.         EndM
  585.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  586.         IMPORT_CFM_FUNCTION CMNewProfile
  587.     ENDIF
  588.  
  589. ;
  590. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  591. ;
  592.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  593.         Macro
  594.         _CMOpenProfile
  595.             move.l              #$0008001C,D0
  596.             dc.w                $ABEE
  597.         EndM
  598.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION CMOpenProfile
  600.     ENDIF
  601.  
  602. ;
  603. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  604. ;
  605.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  606.         Macro
  607.         _CMCloseProfile
  608.             move.l              #$0004001D,D0
  609.             dc.w                $ABEE
  610.         EndM
  611.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  612.         IMPORT_CFM_FUNCTION CMCloseProfile
  613.     ENDIF
  614.  
  615. ;
  616. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  617. ;
  618.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  619.         Macro
  620.         _CMUpdateProfile
  621.             move.l              #$00040034,D0
  622.             dc.w                $ABEE
  623.         EndM
  624.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  625.         IMPORT_CFM_FUNCTION CMUpdateProfile
  626.     ENDIF
  627.  
  628. ;
  629. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  630. ;
  631.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  632.         Macro
  633.         _CMCopyProfile
  634.             move.l              #$000C0025,D0
  635.             dc.w                $ABEE
  636.         EndM
  637.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  638.         IMPORT_CFM_FUNCTION CMCopyProfile
  639.     ENDIF
  640.  
  641. ;
  642. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  643. ;
  644.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  645.         Macro
  646.         _CMValidateProfile
  647.             move.l              #$000C0026,D0
  648.             dc.w                $ABEE
  649.         EndM
  650.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  651.         IMPORT_CFM_FUNCTION CMValidateProfile
  652.     ENDIF
  653.  
  654. ;
  655. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  656. ;
  657.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  658.         Macro
  659.         _CMGetProfileLocation
  660.             move.l              #$0008003C,D0
  661.             dc.w                $ABEE
  662.         EndM
  663.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  664.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  665.     ENDIF
  666.  
  667. ;
  668. ; pascal CMError NCMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile, UInt32 *locationSize)
  669. ;
  670.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  671.         Macro
  672.         _NCMGetProfileLocation
  673.             move.l              #$000C0059,D0
  674.             dc.w                $ABEE
  675.         EndM
  676.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  677.         IMPORT_CFM_FUNCTION NCMGetProfileLocation
  678.     ENDIF
  679.  
  680. ;
  681. ; pascal CMError CMFlattenProfile(CMProfileRef prof, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  682. ;
  683.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  684.         Macro
  685.         _CMFlattenProfile
  686.             move.l              #$00140031,D0
  687.             dc.w                $ABEE
  688.         EndM
  689.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  690.         IMPORT_CFM_FUNCTION CMFlattenProfile
  691.     ENDIF
  692.  
  693.     IF TARGET_OS_MAC THEN
  694. ;
  695. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  696. ;
  697.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  698.         Macro
  699.         _CMUnflattenProfile
  700.             move.l              #$00100032,D0
  701.             dc.w                $ABEE
  702.         EndM
  703.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  704.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  705.     ENDIF
  706.  
  707.     ENDIF    ; TARGET_OS_MAC
  708. ;
  709. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  710. ;
  711.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  712.         Macro
  713.         _CMGetProfileHeader
  714.             move.l              #$00080039,D0
  715.             dc.w                $ABEE
  716.         EndM
  717.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  718.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  719.     ENDIF
  720.  
  721. ;
  722. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  723. ;
  724.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  725.         Macro
  726.         _CMSetProfileHeader
  727.             move.l              #$0008003A,D0
  728.             dc.w                $ABEE
  729.         EndM
  730.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  731.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  732.     ENDIF
  733.  
  734. ;
  735. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  736. ;
  737.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  738.         Macro
  739.         _CMProfileElementExists
  740.             move.l              #$000C001E,D0
  741.             dc.w                $ABEE
  742.         EndM
  743.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  744.         IMPORT_CFM_FUNCTION CMProfileElementExists
  745.     ENDIF
  746.  
  747. ;
  748. ; pascal CMError CMCountProfileElements(CMProfileRef prof, UInt32 *elementCount)
  749. ;
  750.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  751.         Macro
  752.         _CMCountProfileElements
  753.             move.l              #$0008001F,D0
  754.             dc.w                $ABEE
  755.         EndM
  756.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  757.         IMPORT_CFM_FUNCTION CMCountProfileElements
  758.     ENDIF
  759.  
  760. ;
  761. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, UInt32 *elementSize, void *elementData)
  762. ;
  763.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  764.         Macro
  765.         _CMGetProfileElement
  766.             move.l              #$00100020,D0
  767.             dc.w                $ABEE
  768.         EndM
  769.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  770.         IMPORT_CFM_FUNCTION CMGetProfileElement
  771.     ENDIF
  772.  
  773. ;
  774. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, UInt32 elementSize, void *elementData)
  775. ;
  776.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  777.         Macro
  778.         _CMSetProfileElement
  779.             move.l              #$00100023,D0
  780.             dc.w                $ABEE
  781.         EndM
  782.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  783.         IMPORT_CFM_FUNCTION CMSetProfileElement
  784.     ENDIF
  785.  
  786. ;
  787. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, UInt32 elementSize)
  788. ;
  789.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  790.         Macro
  791.         _CMSetProfileElementSize
  792.             move.l              #$000C0038,D0
  793.             dc.w                $ABEE
  794.         EndM
  795.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  796.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  797.     ENDIF
  798.  
  799. ;
  800. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  801. ;
  802.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  803.         Macro
  804.         _CMSetProfileElementReference
  805.             move.l              #$000C0035,D0
  806.             dc.w                $ABEE
  807.         EndM
  808.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  809.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, UInt32 offset, UInt32 *byteCount, void *elementData)
  814. ;
  815.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  816.         Macro
  817.         _CMGetPartialProfileElement
  818.             move.l              #$00140036,D0
  819.             dc.w                $ABEE
  820.         EndM
  821.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  822.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  823.     ENDIF
  824.  
  825. ;
  826. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, UInt32 offset, UInt32 byteCount, void *elementData)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  829.         Macro
  830.         _CMSetPartialProfileElement
  831.             move.l              #$00140037,D0
  832.             dc.w                $ABEE
  833.         EndM
  834.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  835.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  836.     ENDIF
  837.  
  838. ;
  839. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, UInt32 index, OSType *tag, UInt32 *elementSize, Boolean *refs)
  840. ;
  841.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  842.         Macro
  843.         _CMGetIndProfileElementInfo
  844.             move.l              #$00140021,D0
  845.             dc.w                $ABEE
  846.         EndM
  847.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  848.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  849.     ENDIF
  850.  
  851. ;
  852. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, UInt32 index, UInt32 *elementSize, void *elementData)
  853. ;
  854.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  855.         Macro
  856.         _CMGetIndProfileElement
  857.             move.l              #$00100022,D0
  858.             dc.w                $ABEE
  859.         EndM
  860.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  861.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  862.     ENDIF
  863.  
  864. ;
  865. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  866. ;
  867.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  868.         Macro
  869.         _CMRemoveProfileElement
  870.             move.l              #$00080024,D0
  871.             dc.w                $ABEE
  872.         EndM
  873.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  874.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  875.     ENDIF
  876.  
  877. ;
  878. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  879. ;
  880.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  881.         Macro
  882.         _CMGetScriptProfileDescription
  883.             move.l              #$000C003E,D0
  884.             dc.w                $ABEE
  885.         EndM
  886.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  887.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  888.     ENDIF
  889.  
  890. ;
  891. ; pascal CMError CMGetProfileDescriptions(CMProfileRef prof, char *aName, UInt32 *aCount, Str255 mName, ScriptCode *mCode, UniChar *uName, UniCharCount *uCount)
  892. ;
  893.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  894.         Macro
  895.         _CMGetProfileDescriptions
  896.             move.l              #$001A0067,D0
  897.             dc.w                $ABEE
  898.         EndM
  899.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  900.         IMPORT_CFM_FUNCTION CMGetProfileDescriptions
  901.     ENDIF
  902.  
  903. ;
  904. ; pascal CMError CMSetProfileDescriptions(CMProfileRef prof, const char *aName, UInt32 aCount, ConstStr255Param mName, ScriptCode mCode, const UniChar *uName, UniCharCount uCount)
  905. ;
  906.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  907.         Macro
  908.         _CMSetProfileDescriptions
  909.             move.l              #$001A0068,D0
  910.             dc.w                $ABEE
  911.         EndM
  912.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  913.         IMPORT_CFM_FUNCTION CMSetProfileDescriptions
  914.     ENDIF
  915.  
  916. ;
  917. ; pascal CMError CMCloneProfileRef(CMProfileRef prof)
  918. ;
  919.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  920.         Macro
  921.         _CMCloneProfileRef
  922.             move.l              #$00040042,D0
  923.             dc.w                $ABEE
  924.         EndM
  925.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  926.         IMPORT_CFM_FUNCTION CMCloneProfileRef
  927.     ENDIF
  928.  
  929. ;
  930. ; pascal CMError CMGetProfileRefCount(CMProfileRef prof, long *count)
  931. ;
  932.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  933.         Macro
  934.         _CMGetProfileRefCount
  935.             move.l              #$00080043,D0
  936.             dc.w                $ABEE
  937.         EndM
  938.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  939.         IMPORT_CFM_FUNCTION CMGetProfileRefCount
  940.     ENDIF
  941.  
  942. ;
  943. ; pascal CMError CMProfileModified(CMProfileRef prof, Boolean *modified)
  944. ;
  945.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  946.         Macro
  947.         _CMProfileModified
  948.             move.l              #$00080044,D0
  949.             dc.w                $ABEE
  950.         EndM
  951.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  952.         IMPORT_CFM_FUNCTION CMProfileModified
  953.     ENDIF
  954.  
  955.  
  956. ;  named Color access functions 
  957. ;
  958. ; pascal CMError CMGetNamedColorInfo(CMProfileRef prof, UInt32 *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, UInt32 *count, StringPtr prefix, StringPtr suffix)
  959. ;
  960.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  961.         Macro
  962.         _CMGetNamedColorInfo
  963.             move.l              #$001C0046,D0
  964.             dc.w                $ABEE
  965.         EndM
  966.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  967.         IMPORT_CFM_FUNCTION CMGetNamedColorInfo
  968.     ENDIF
  969.  
  970. ;
  971. ; pascal CMError CMGetNamedColorValue(CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  972. ;
  973.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  974.         Macro
  975.         _CMGetNamedColorValue
  976.             move.l              #$00100047,D0
  977.             dc.w                $ABEE
  978.         EndM
  979.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  980.         IMPORT_CFM_FUNCTION CMGetNamedColorValue
  981.     ENDIF
  982.  
  983. ;
  984. ; pascal CMError CMGetIndNamedColorValue(CMProfileRef prof, UInt32 index, CMColor *deviceColor, CMColor *PCSColor)
  985. ;
  986.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  987.         Macro
  988.         _CMGetIndNamedColorValue
  989.             move.l              #$00100048,D0
  990.             dc.w                $ABEE
  991.         EndM
  992.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  993.         IMPORT_CFM_FUNCTION CMGetIndNamedColorValue
  994.     ENDIF
  995.  
  996. ;
  997. ; pascal CMError CMGetNamedColorIndex(CMProfileRef prof, StringPtr name, UInt32 *index)
  998. ;
  999.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1000.         Macro
  1001.         _CMGetNamedColorIndex
  1002.             move.l              #$000C0049,D0
  1003.             dc.w                $ABEE
  1004.         EndM
  1005.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1006.         IMPORT_CFM_FUNCTION CMGetNamedColorIndex
  1007.     ENDIF
  1008.  
  1009. ;
  1010. ; pascal CMError CMGetNamedColorName(CMProfileRef prof, UInt32 index, StringPtr name)
  1011. ;
  1012.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1013.         Macro
  1014.         _CMGetNamedColorName
  1015.             move.l              #$000C004A,D0
  1016.             dc.w                $ABEE
  1017.         EndM
  1018.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1019.         IMPORT_CFM_FUNCTION CMGetNamedColorName
  1020.     ENDIF
  1021.  
  1022.  
  1023. ;  General-purpose matching functions 
  1024. ;
  1025. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  1026. ;
  1027.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1028.         Macro
  1029.         _NCWNewColorWorld
  1030.             move.l              #$000C0014,D0
  1031.             dc.w                $ABEE
  1032.         EndM
  1033.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1034.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  1035.     ENDIF
  1036.  
  1037. ;
  1038. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  1039. ;
  1040.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1041.         Macro
  1042.         _CWConcatColorWorld
  1043.             move.l              #$00080015,D0
  1044.             dc.w                $ABEE
  1045.         EndM
  1046.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1047.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  1048.     ENDIF
  1049.  
  1050. ;
  1051. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  1052. ;
  1053.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1054.         Macro
  1055.         _CWNewLinkProfile
  1056.             move.l              #$000C0033,D0
  1057.             dc.w                $ABEE
  1058.         EndM
  1059.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1060.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  1061.     ENDIF
  1062.  
  1063. ;
  1064. ; pascal CMError NCWConcatColorWorld(CMWorldRef *cw, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
  1065. ;
  1066.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1067.         Macro
  1068.         _NCWConcatColorWorld
  1069.             move.l              #$00080061,D0
  1070.             dc.w                $ABEE
  1071.         EndM
  1072.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1073.         IMPORT_CFM_FUNCTION NCWConcatColorWorld
  1074.     ENDIF
  1075.  
  1076. ;
  1077. ; pascal CMError NCWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
  1078. ;
  1079.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1080.         Macro
  1081.         _NCWNewLinkProfile
  1082.             move.l              #$000C0062,D0
  1083.             dc.w                $ABEE
  1084.         EndM
  1085.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1086.         IMPORT_CFM_FUNCTION NCWNewLinkProfile
  1087.     ENDIF
  1088.  
  1089. ;
  1090. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  1091. ;
  1092.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1093.         Macro
  1094.         _CWDisposeColorWorld
  1095.             move.l              #$00040001,D0
  1096.             dc.w                $ABEE
  1097.         EndM
  1098.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1099.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  1100.     ENDIF
  1101.  
  1102. ;
  1103. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, UInt32 count)
  1104. ;
  1105.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1106.         Macro
  1107.         _CWMatchColors
  1108.             move.l              #$000C0002,D0
  1109.             dc.w                $ABEE
  1110.         EndM
  1111.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1112.         IMPORT_CFM_FUNCTION CWMatchColors
  1113.     ENDIF
  1114.  
  1115. ;
  1116. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, UInt32 count, UInt32 *result)
  1117. ;
  1118.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1119.         Macro
  1120.         _CWCheckColors
  1121.             move.l              #$00100003,D0
  1122.             dc.w                $ABEE
  1123.         EndM
  1124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1125.         IMPORT_CFM_FUNCTION CWCheckColors
  1126.     ENDIF
  1127.  
  1128. ;
  1129. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  1130. ;
  1131.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1132.         Macro
  1133.         _CWMatchBitmap
  1134.             move.l              #$0010002C,D0
  1135.             dc.w                $ABEE
  1136.         EndM
  1137.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1138.         IMPORT_CFM_FUNCTION CWMatchBitmap
  1139.     ENDIF
  1140.  
  1141. ;
  1142. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  1143. ;
  1144.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1145.         Macro
  1146.         _CWCheckBitmap
  1147.             move.l              #$0014002D,D0
  1148.             dc.w                $ABEE
  1149.         EndM
  1150.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1151.         IMPORT_CFM_FUNCTION CWCheckBitmap
  1152.     ENDIF
  1153.  
  1154.  
  1155. ;  Quickdraw-specific matching 
  1156. ;
  1157. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  1158. ;
  1159.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1160.         Macro
  1161.         _CWMatchPixMap
  1162.             move.l              #$00100004,D0
  1163.             dc.w                $ABEE
  1164.         EndM
  1165.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1166.         IMPORT_CFM_FUNCTION CWMatchPixMap
  1167.     ENDIF
  1168.  
  1169. ;
  1170. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  1171. ;
  1172.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1173.         Macro
  1174.         _CWCheckPixMap
  1175.             move.l              #$00140007,D0
  1176.             dc.w                $ABEE
  1177.         EndM
  1178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1179.         IMPORT_CFM_FUNCTION CWCheckPixMap
  1180.     ENDIF
  1181.  
  1182.     IF TARGET_OS_MAC THEN
  1183. ;
  1184. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  1185. ;
  1186.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1187.         Macro
  1188.         _NCMBeginMatching
  1189.             move.l              #$000C0016,D0
  1190.             dc.w                $ABEE
  1191.         EndM
  1192.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1193.         IMPORT_CFM_FUNCTION NCMBeginMatching
  1194.     ENDIF
  1195.  
  1196. ;
  1197. ; pascal void CMEndMatching(CMMatchRef myRef)
  1198. ;
  1199.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1200.         Macro
  1201.         _CMEndMatching
  1202.             move.l              #$0004000B,D0
  1203.             dc.w                $ABEE
  1204.         EndM
  1205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1206.         IMPORT_CFM_FUNCTION CMEndMatching
  1207.     ENDIF
  1208.  
  1209. ;
  1210. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1211. ;
  1212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1213.         Macro
  1214.         _NCMDrawMatchedPicture
  1215.             move.l              #$000C0017,D0
  1216.             dc.w                $ABEE
  1217.         EndM
  1218.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1219.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  1220.     ENDIF
  1221.  
  1222. ;
  1223. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1224. ;
  1225.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1226.         Macro
  1227.         _CMEnableMatchingComment
  1228.             move.l              #$0002000D,D0
  1229.             dc.w                $ABEE
  1230.         EndM
  1231.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1232.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  1233.     ENDIF
  1234.  
  1235. ;
  1236. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, UInt32 flags)
  1237. ;
  1238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1239.         Macro
  1240.         _NCMUseProfileComment
  1241.             move.l              #$0008003B,D0
  1242.             dc.w                $ABEE
  1243.         EndM
  1244.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1245.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  1246.     ENDIF
  1247.  
  1248.     ENDIF    ; TARGET_OS_MAC
  1249.     IF TARGET_OS_WIN32 THEN
  1250. ;
  1251. ; pascal CMError CWMatchHBITMAP(CMWorldRef cw, HBITMAP hBitmap, CMBitmapCallBackUPP progressProc, void *refCon)
  1252. ;
  1253.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1254.         IMPORT_CFM_FUNCTION CWMatchHBITMAP
  1255.     ENDIF
  1256.  
  1257.     ENDIF    ; TARGET_OS_WIN32
  1258. ;
  1259. ; pascal CMError CMCreateProfileIdentifier(CMProfileRef prof, CMProfileIdentifierPtr ident, UInt32 *size)
  1260. ;
  1261.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1262.         Macro
  1263.         _CMCreateProfileIdentifier
  1264.             move.l              #$000C0041,D0
  1265.             dc.w                $ABEE
  1266.         EndM
  1267.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1268.         IMPORT_CFM_FUNCTION CMCreateProfileIdentifier
  1269.     ENDIF
  1270.  
  1271.  
  1272. ;  System Profile access 
  1273. ;
  1274. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1275. ;
  1276.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1277.         Macro
  1278.         _CMGetSystemProfile
  1279.             move.l              #$00040018,D0
  1280.             dc.w                $ABEE
  1281.         EndM
  1282.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1283.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  1284.     ENDIF
  1285.  
  1286. ;
  1287. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1288. ;
  1289.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1290.         Macro
  1291.         _CMSetSystemProfile
  1292.             move.l              #$00040019,D0
  1293.             dc.w                $ABEE
  1294.         EndM
  1295.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1296.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  1297.     ENDIF
  1298.  
  1299. ;
  1300. ; pascal CMError NCMSetSystemProfile(const CMProfileLocation *profLoc)
  1301. ;
  1302.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1303.         Macro
  1304.         _NCMSetSystemProfile
  1305.             move.l              #$00040064,D0
  1306.             dc.w                $ABEE
  1307.         EndM
  1308.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1309.         IMPORT_CFM_FUNCTION NCMSetSystemProfile
  1310.     ENDIF
  1311.  
  1312. ;
  1313. ; pascal CMError CMGetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef *prof)
  1314. ;
  1315.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1316.         Macro
  1317.         _CMGetDefaultProfileBySpace
  1318.             move.l              #$0008005A,D0
  1319.             dc.w                $ABEE
  1320.         EndM
  1321.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1322.         IMPORT_CFM_FUNCTION CMGetDefaultProfileBySpace
  1323.     ENDIF
  1324.  
  1325. ;
  1326. ; pascal CMError CMSetDefaultProfileBySpace(OSType dataColorSpace, CMProfileRef prof)
  1327. ;
  1328.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1329.         Macro
  1330.         _CMSetDefaultProfileBySpace
  1331.             move.l              #$0008005B,D0
  1332.             dc.w                $ABEE
  1333.         EndM
  1334.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1335.         IMPORT_CFM_FUNCTION CMSetDefaultProfileBySpace
  1336.     ENDIF
  1337.  
  1338.     IF TARGET_OS_MAC THEN
  1339. ;
  1340. ; pascal CMError CMGetProfileByAVID(AVIDType theAVID, CMProfileRef *prof)
  1341. ;
  1342.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1343.         Macro
  1344.         _CMGetProfileByAVID
  1345.             move.l              #$0008005C,D0
  1346.             dc.w                $ABEE
  1347.         EndM
  1348.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1349.         IMPORT_CFM_FUNCTION CMGetProfileByAVID
  1350.     ENDIF
  1351.  
  1352. ;
  1353. ; pascal CMError CMSetProfileByAVID(AVIDType theAVID, CMProfileRef prof)
  1354. ;
  1355.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1356.         Macro
  1357.         _CMSetProfileByAVID
  1358.             move.l              #$0008005D,D0
  1359.             dc.w                $ABEE
  1360.         EndM
  1361.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1362.         IMPORT_CFM_FUNCTION CMSetProfileByAVID
  1363.     ENDIF
  1364.  
  1365.     ENDIF    ; TARGET_OS_MAC
  1366. ;  Profile Management 
  1367. ;
  1368. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, UInt32 *count, CMProfileSearchRef *searchResult)
  1369. ;
  1370.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1371.         Macro
  1372.         _CMNewProfileSearch
  1373.             move.l              #$00100027,D0
  1374.             dc.w                $ABEE
  1375.         EndM
  1376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1377.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  1378.     ENDIF
  1379.  
  1380. ;
  1381. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, UInt32 *count)
  1382. ;
  1383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1384.         Macro
  1385.         _CMUpdateProfileSearch
  1386.             move.l              #$000C0028,D0
  1387.             dc.w                $ABEE
  1388.         EndM
  1389.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1390.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  1391.     ENDIF
  1392.  
  1393. ;
  1394. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1395. ;
  1396.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1397.         Macro
  1398.         _CMDisposeProfileSearch
  1399.             move.l              #$00040029,D0
  1400.             dc.w                $ABEE
  1401.         EndM
  1402.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1403.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  1404.     ENDIF
  1405.  
  1406. ;
  1407. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, UInt32 index, CMProfileRef *prof)
  1408. ;
  1409.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1410.         Macro
  1411.         _CMSearchGetIndProfile
  1412.             move.l              #$000C002A,D0
  1413.             dc.w                $ABEE
  1414.         EndM
  1415.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1416.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  1417.     ENDIF
  1418.  
  1419. ;
  1420. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, UInt32 index, FSSpec *profileFile)
  1421. ;
  1422.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1423.         Macro
  1424.         _CMSearchGetIndProfileFileSpec
  1425.             move.l              #$000C002B,D0
  1426.             dc.w                $ABEE
  1427.         EndM
  1428.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1429.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  1430.     ENDIF
  1431.  
  1432. ;
  1433. ; pascal CMError CMProfileIdentifierFolderSearch(CMProfileIdentifierPtr ident, UInt32 *matchedCount, CMProfileSearchRef *searchResult)
  1434. ;
  1435.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1436.         Macro
  1437.         _CMProfileIdentifierFolderSearch
  1438.             move.l              #$000C003F,D0
  1439.             dc.w                $ABEE
  1440.         EndM
  1441.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1442.         IMPORT_CFM_FUNCTION CMProfileIdentifierFolderSearch
  1443.     ENDIF
  1444.  
  1445. ;
  1446. ; pascal CMError CMProfileIdentifierListSearch(CMProfileIdentifierPtr ident, CMProfileRef *profileList, UInt32 listSize, UInt32 *matchedCount, CMProfileRef *matchedList)
  1447. ;
  1448.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1449.         Macro
  1450.         _CMProfileIdentifierListSearch
  1451.             move.l              #$00140040,D0
  1452.             dc.w                $ABEE
  1453.         EndM
  1454.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1455.         IMPORT_CFM_FUNCTION CMProfileIdentifierListSearch
  1456.     ENDIF
  1457.  
  1458. ;
  1459. ; pascal CMError CMIterateColorSyncFolder(CMProfileIterateUPP proc, UInt32 *seed, UInt32 *count, void *refCon)
  1460. ;
  1461.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1462.         Macro
  1463.         _CMIterateColorSyncFolder
  1464.             move.l              #$00100058,D0
  1465.             dc.w                $ABEE
  1466.         EndM
  1467.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1468.         IMPORT_CFM_FUNCTION CMIterateColorSyncFolder
  1469.     ENDIF
  1470.  
  1471. ;
  1472. ; pascal CMError NCMUnflattenProfile(CMProfileLocation *targetLocation, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1473. ;
  1474.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1475.         Macro
  1476.         _NCMUnflattenProfile
  1477.             move.l              #$00100065,D0
  1478.             dc.w                $ABEE
  1479.         EndM
  1480.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1481.         IMPORT_CFM_FUNCTION NCMUnflattenProfile
  1482.     ENDIF
  1483.  
  1484. ;  Utilities 
  1485.     IF TARGET_OS_MAC THEN
  1486. ;
  1487. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1488. ;
  1489.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1490.         Macro
  1491.         _CMGetColorSyncFolderSpec
  1492.             move.l              #$000C0011,D0
  1493.             dc.w                $ABEE
  1494.         EndM
  1495.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1496.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  1497.     ENDIF
  1498.  
  1499.     ENDIF    ; TARGET_OS_MAC
  1500.     IF TARGET_OS_WIN32 ++ TARGET_OS_UNIX THEN
  1501. ;
  1502. ; pascal CMError CMGetColorSyncFolderPath(Boolean createFolder, char *lpBuffer, UInt32 uSize)
  1503. ;
  1504.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1505.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderPath
  1506.     ENDIF
  1507.  
  1508.     ENDIF
  1509. ;
  1510. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1511. ;
  1512.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1513.         Macro
  1514.         _CMGetCWInfo
  1515.             move.l              #$0008001A,D0
  1516.             dc.w                $ABEE
  1517.         EndM
  1518.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1519.         IMPORT_CFM_FUNCTION CMGetCWInfo
  1520.     ENDIF
  1521.  
  1522. ;
  1523. ; pascal CMError CMConvertProfile2to1(CMProfileRef profv2, CMProfileHandle *profv1)
  1524. ;
  1525.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1526.         Macro
  1527.         _CMConvertProfile2to1
  1528.             move.l              #$00080045,D0
  1529.             dc.w                $ABEE
  1530.         EndM
  1531.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1532.         IMPORT_CFM_FUNCTION CMConvertProfile2to1
  1533.     ENDIF
  1534.  
  1535. ;
  1536. ; pascal CMError CMGetPreferredCMM(OSType *cmmType, Boolean *preferredCMMnotfound)
  1537. ;
  1538.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1539.         Macro
  1540.         _CMGetPreferredCMM
  1541.             move.l              #$0008005E,D0
  1542.             dc.w                $ABEE
  1543.         EndM
  1544.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1545.         IMPORT_CFM_FUNCTION CMGetPreferredCMM
  1546.     ENDIF
  1547.  
  1548. ;
  1549. ; pascal CMError CMIterateCMMInfo(CMMIterateUPP proc, UInt32 *count, void *refCon)
  1550. ;
  1551.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1552.         Macro
  1553.         _CMIterateCMMInfo
  1554.             move.l              #$000C0063,D0
  1555.             dc.w                $ABEE
  1556.         EndM
  1557.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1558.         IMPORT_CFM_FUNCTION CMIterateCMMInfo
  1559.     ENDIF
  1560.  
  1561. ;
  1562. ; pascal CMError CMGetColorSyncVersion(UInt32 *version)
  1563. ;
  1564.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1565.         Macro
  1566.         _CMGetColorSyncVersion
  1567.             move.l              #$00040066,D0
  1568.             dc.w                $ABEE
  1569.         EndM
  1570.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1571.         IMPORT_CFM_FUNCTION CMGetColorSyncVersion
  1572.     ENDIF
  1573.  
  1574. ;  ColorSpace conversion functions 
  1575. ;
  1576. ; pascal CMError CMConvertXYZToLab(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1577. ;
  1578.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1579.         Macro
  1580.         _CMConvertXYZToLab
  1581.             move.l              #$0010004B,D0
  1582.             dc.w                $ABEE
  1583.         EndM
  1584.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1585.         IMPORT_CFM_FUNCTION CMConvertXYZToLab
  1586.     ENDIF
  1587.  
  1588. ;
  1589. ; pascal CMError CMConvertLabToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1590. ;
  1591.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1592.         Macro
  1593.         _CMConvertLabToXYZ
  1594.             move.l              #$0010004C,D0
  1595.             dc.w                $ABEE
  1596.         EndM
  1597.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1598.         IMPORT_CFM_FUNCTION CMConvertLabToXYZ
  1599.     ENDIF
  1600.  
  1601. ;
  1602. ; pascal CMError CMConvertXYZToLuv(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1603. ;
  1604.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1605.         Macro
  1606.         _CMConvertXYZToLuv
  1607.             move.l              #$0010004D,D0
  1608.             dc.w                $ABEE
  1609.         EndM
  1610.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1611.         IMPORT_CFM_FUNCTION CMConvertXYZToLuv
  1612.     ENDIF
  1613.  
  1614. ;
  1615. ; pascal CMError CMConvertLuvToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, UInt32 count)
  1616. ;
  1617.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1618.         Macro
  1619.         _CMConvertLuvToXYZ
  1620.             move.l              #$0010004E,D0
  1621.             dc.w                $ABEE
  1622.         EndM
  1623.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1624.         IMPORT_CFM_FUNCTION CMConvertLuvToXYZ
  1625.     ENDIF
  1626.  
  1627. ;
  1628. ; pascal CMError CMConvertXYZToYxy(const CMColor *src, CMColor *dst, UInt32 count)
  1629. ;
  1630.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1631.         Macro
  1632.         _CMConvertXYZToYxy
  1633.             move.l              #$000C004F,D0
  1634.             dc.w                $ABEE
  1635.         EndM
  1636.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1637.         IMPORT_CFM_FUNCTION CMConvertXYZToYxy
  1638.     ENDIF
  1639.  
  1640. ;
  1641. ; pascal CMError CMConvertYxyToXYZ(const CMColor *src, CMColor *dst, UInt32 count)
  1642. ;
  1643.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1644.         Macro
  1645.         _CMConvertYxyToXYZ
  1646.             move.l              #$000C0050,D0
  1647.             dc.w                $ABEE
  1648.         EndM
  1649.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1650.         IMPORT_CFM_FUNCTION CMConvertYxyToXYZ
  1651.     ENDIF
  1652.  
  1653. ;
  1654. ; pascal CMError CMConvertRGBToHLS(const CMColor *src, CMColor *dst, UInt32 count)
  1655. ;
  1656.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1657.         Macro
  1658.         _CMConvertRGBToHLS
  1659.             move.l              #$000C0051,D0
  1660.             dc.w                $ABEE
  1661.         EndM
  1662.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1663.         IMPORT_CFM_FUNCTION CMConvertRGBToHLS
  1664.     ENDIF
  1665.  
  1666. ;
  1667. ; pascal CMError CMConvertHLSToRGB(const CMColor *src, CMColor *dst, UInt32 count)
  1668. ;
  1669.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1670.         Macro
  1671.         _CMConvertHLSToRGB
  1672.             move.l              #$000C0052,D0
  1673.             dc.w                $ABEE
  1674.         EndM
  1675.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1676.         IMPORT_CFM_FUNCTION CMConvertHLSToRGB
  1677.     ENDIF
  1678.  
  1679. ;
  1680. ; pascal CMError CMConvertRGBToHSV(const CMColor *src, CMColor *dst, UInt32 count)
  1681. ;
  1682.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1683.         Macro
  1684.         _CMConvertRGBToHSV
  1685.             move.l              #$000C0053,D0
  1686.             dc.w                $ABEE
  1687.         EndM
  1688.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1689.         IMPORT_CFM_FUNCTION CMConvertRGBToHSV
  1690.     ENDIF
  1691.  
  1692. ;
  1693. ; pascal CMError CMConvertHSVToRGB(const CMColor *src, CMColor *dst, UInt32 count)
  1694. ;
  1695.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1696.         Macro
  1697.         _CMConvertHSVToRGB
  1698.             move.l              #$000C0054,D0
  1699.             dc.w                $ABEE
  1700.         EndM
  1701.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1702.         IMPORT_CFM_FUNCTION CMConvertHSVToRGB
  1703.     ENDIF
  1704.  
  1705. ;
  1706. ; pascal CMError CMConvertRGBToGray(const CMColor *src, CMColor *dst, UInt32 count)
  1707. ;
  1708.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1709.         Macro
  1710.         _CMConvertRGBToGray
  1711.             move.l              #$000C0055,D0
  1712.             dc.w                $ABEE
  1713.         EndM
  1714.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1715.         IMPORT_CFM_FUNCTION CMConvertRGBToGray
  1716.     ENDIF
  1717.  
  1718. ;
  1719. ; pascal CMError CMConvertXYZToFixedXYZ(const CMXYZColor *src, CMFixedXYZColor *dst, UInt32 count)
  1720. ;
  1721.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1722.         Macro
  1723.         _CMConvertXYZToFixedXYZ
  1724.             move.l              #$000C0056,D0
  1725.             dc.w                $ABEE
  1726.         EndM
  1727.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1728.         IMPORT_CFM_FUNCTION CMConvertXYZToFixedXYZ
  1729.     ENDIF
  1730.  
  1731. ;
  1732. ; pascal CMError CMConvertFixedXYZToXYZ(const CMFixedXYZColor *src, CMXYZColor *dst, UInt32 count)
  1733. ;
  1734.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1735.         Macro
  1736.         _CMConvertFixedXYZToXYZ
  1737.             move.l              #$000C0057,D0
  1738.             dc.w                $ABEE
  1739.         EndM
  1740.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1741.         IMPORT_CFM_FUNCTION CMConvertFixedXYZToXYZ
  1742.     ENDIF
  1743.  
  1744.  
  1745. ;  PS-related 
  1746. ;
  1747. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1748. ;
  1749.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1750.         Macro
  1751.         _CMGetPS2ColorSpace
  1752.             move.l              #$0014002E,D0
  1753.             dc.w                $ABEE
  1754.         EndM
  1755.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1756.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1757.     ENDIF
  1758.  
  1759. ;
  1760. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1761. ;
  1762.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1763.         Macro
  1764.         _CMGetPS2ColorRenderingIntent
  1765.             move.l              #$0014002F,D0
  1766.             dc.w                $ABEE
  1767.         EndM
  1768.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1769.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1770.     ENDIF
  1771.  
  1772. ;
  1773. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, UInt32 flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1774. ;
  1775.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1776.         Macro
  1777.         _CMGetPS2ColorRendering
  1778.             move.l              #$00180030,D0
  1779.             dc.w                $ABEE
  1780.         EndM
  1781.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1782.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1783.     ENDIF
  1784.  
  1785. ;
  1786. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, UInt32 *vmSize, Boolean *preferredCMMnotfound)
  1787. ;
  1788.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1789.         Macro
  1790.         _CMGetPS2ColorRenderingVMSize
  1791.             move.l              #$0010003D,D0
  1792.             dc.w                $ABEE
  1793.         EndM
  1794.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1795.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1796.     ENDIF
  1797.  
  1798.  
  1799. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1800.     IF TARGET_OS_MAC THEN
  1801. ;
  1802. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1803. ;
  1804.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1805.         Macro
  1806.         _CWNewColorWorld
  1807.             move.l              #$000C0000,D0
  1808.             dc.w                $ABEE
  1809.         EndM
  1810.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1811.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1812.     ENDIF
  1813.  
  1814. ;
  1815. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1816. ;
  1817.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1818.         Macro
  1819.         _ConcatenateProfiles
  1820.             move.l              #$000C000C,D0
  1821.             dc.w                $ABEE
  1822.         EndM
  1823.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1824.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1825.     ENDIF
  1826.  
  1827. ;
  1828. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1829. ;
  1830.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1831.         Macro
  1832.         _CMBeginMatching
  1833.             move.l              #$000C000A,D0
  1834.             dc.w                $ABEE
  1835.         EndM
  1836.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1837.         IMPORT_CFM_FUNCTION CMBeginMatching
  1838.     ENDIF
  1839.  
  1840. ;
  1841. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1842. ;
  1843.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1844.         Macro
  1845.         _CMDrawMatchedPicture
  1846.             move.l              #$000C0009,D0
  1847.             dc.w                $ABEE
  1848.         EndM
  1849.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1850.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1851.     ENDIF
  1852.  
  1853. ;
  1854. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1855. ;
  1856.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1857.         Macro
  1858.         _CMUseProfileComment
  1859.             move.l              #$00040008,D0
  1860.             dc.w                $ABEE
  1861.         EndM
  1862.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1863.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1864.     ENDIF
  1865.  
  1866. ;
  1867. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1868. ;
  1869.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1870.         Macro
  1871.         _CMGetProfileName
  1872.             move.l              #$0008000E,D0
  1873.             dc.w                $ABEE
  1874.         EndM
  1875.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1876.         IMPORT_CFM_FUNCTION CMGetProfileName
  1877.     ENDIF
  1878.  
  1879. ;
  1880. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1881. ;
  1882.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1883.         Macro
  1884.         _CMGetProfileAdditionalDataOffset
  1885.             move.l              #$0004000F,D0
  1886.             dc.w                $ABEE
  1887.         EndM
  1888.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1889.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1890.     ENDIF
  1891.  
  1892.  
  1893. ;  ProfileResponder functions 
  1894. ;
  1895. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1896. ;
  1897.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1898.         Macro
  1899.         _GetProfile
  1900.             move.l              #$00100005,D0
  1901.             dc.w                $ABEE
  1902.         EndM
  1903.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1904.         IMPORT_CFM_FUNCTION GetProfile
  1905.     ENDIF
  1906.  
  1907. ;
  1908. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1909. ;
  1910.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1911.         Macro
  1912.         _SetProfile
  1913.             move.l              #$000C0006,D0
  1914.             dc.w                $ABEE
  1915.         EndM
  1916.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1917.         IMPORT_CFM_FUNCTION SetProfile
  1918.     ENDIF
  1919.  
  1920. ;
  1921. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1922. ;
  1923.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1924.         Macro
  1925.         _SetProfileDescription
  1926.             move.l              #$00100010,D0
  1927.             dc.w                $ABEE
  1928.         EndM
  1929.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1930.         IMPORT_CFM_FUNCTION SetProfileDescription
  1931.     ENDIF
  1932.  
  1933. ;
  1934. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1935. ;
  1936.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1937.         Macro
  1938.         _GetIndexedProfile
  1939.             move.l              #$00140012,D0
  1940.             dc.w                $ABEE
  1941.         EndM
  1942.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1943.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1944.     ENDIF
  1945.  
  1946. ;
  1947. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1948. ;
  1949.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1950.         Macro
  1951.         _DeleteDeviceProfile
  1952.             move.l              #$000C0013,D0
  1953.             dc.w                $ABEE
  1954.         EndM
  1955.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1956.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  1957.     ENDIF
  1958.  
  1959.  
  1960.     IF OLDROUTINENAMES THEN
  1961. ;  constants 
  1962.  
  1963. kMatchCMMType                    EQU        $00000001
  1964. kMatchApplProfileVersion        EQU        $00000002
  1965. kMatchDataType                    EQU        $00000004
  1966. kMatchDeviceType                EQU        $00000008
  1967. kMatchDeviceManufacturer        EQU        $00000010
  1968. kMatchDeviceModel                EQU        $00000020
  1969. kMatchDeviceAttributes            EQU        $00000040
  1970. kMatchFlags                        EQU        $00000080
  1971. kMatchOptions                    EQU        $00000100
  1972. kMatchWhite                        EQU        $00000200
  1973. kMatchBlack                        EQU        $00000400
  1974. ;  types 
  1975. CMYKColor                RECORD 0
  1976. f                         ds        CMCMYKColor
  1977. sizeof                     EQU *                    ; size:   $8 (8)
  1978.                         ENDR
  1979.  
  1980.  
  1981. ; typedef CMWorldRef                     CWorld
  1982.  
  1983. ; typedef long *                        CMGamutResult
  1984.  
  1985. ;  functions 
  1986. ;
  1987. ; pascal void EndMatching(CMMatchRef myRef)
  1988. ;
  1989.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1990.         Macro
  1991.         _EndMatching
  1992.             move.l              #$0004000B,D0
  1993.             dc.w                $ABEE
  1994.         EndM
  1995.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1996.         IMPORT_CFM_FUNCTION EndMatching
  1997.     ENDIF
  1998.  
  1999. ;
  2000. ; pascal void EnableMatching(Boolean enableIt)
  2001. ;
  2002.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2003.         Macro
  2004.         _EnableMatching
  2005.             move.l              #$0002000D,D0
  2006.             dc.w                $ABEE
  2007.         EndM
  2008.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2009.         IMPORT_CFM_FUNCTION EnableMatching
  2010.     ENDIF
  2011.  
  2012. ;
  2013. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  2014. ;
  2015.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2016.         Macro
  2017.         _GetColorSyncFolderSpec
  2018.             move.l              #$000C0011,D0
  2019.             dc.w                $ABEE
  2020.         EndM
  2021.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2022.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  2023.     ENDIF
  2024.  
  2025. ;
  2026. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  2027. ;
  2028.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2029.         Macro
  2030.         _BeginMatching
  2031.             move.l              #$000C000A,D0
  2032.             dc.w                $ABEE
  2033.         EndM
  2034.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2035.         IMPORT_CFM_FUNCTION BeginMatching
  2036.     ENDIF
  2037.  
  2038. ;
  2039. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  2040. ;
  2041.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2042.         Macro
  2043.         _DrawMatchedPicture
  2044.             move.l              #$000C0009,D0
  2045.             dc.w                $ABEE
  2046.         EndM
  2047.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2048.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  2049.     ENDIF
  2050.  
  2051. ;
  2052. ; pascal CMError UseProfile(CMProfileHandle profile)
  2053. ;
  2054.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2055.         Macro
  2056.         _UseProfile
  2057.             move.l              #$00040008,D0
  2058.             dc.w                $ABEE
  2059.         EndM
  2060.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2061.         IMPORT_CFM_FUNCTION UseProfile
  2062.     ENDIF
  2063.  
  2064. ;
  2065. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  2066. ;
  2067.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2068.         Macro
  2069.         _GetProfileName
  2070.             move.l              #$0008000E,D0
  2071.             dc.w                $ABEE
  2072.         EndM
  2073.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2074.         IMPORT_CFM_FUNCTION GetProfileName
  2075.     ENDIF
  2076.  
  2077. ;
  2078. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  2079. ;
  2080.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2081.         Macro
  2082.         _GetProfileAdditionalDataOffset
  2083.             move.l              #$0004000F,D0
  2084.             dc.w                $ABEE
  2085.         EndM
  2086.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2087.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  2088.     ENDIF
  2089.  
  2090.     ENDIF    ; OLDROUTINENAMES
  2091.  
  2092. ;  Deprecated stuff
  2093.  
  2094. ;  PrGeneral parameter blocks 
  2095. TEnableColorMatchingBlk    RECORD 0
  2096. iOpCode                     ds.w    1                ; offset: $0 (0)
  2097. iError                     ds.w    1                ; offset: $2 (2)
  2098. lReserved                 ds.l    1                ; offset: $4 (4)
  2099. hPrint                     ds.l    1                ; offset: $8 (8)
  2100. fEnableIt                 ds.b    1                ; offset: $C (12)
  2101. filler                     ds.b    1                ; offset: $D (13)
  2102. sizeof                     EQU *                    ; size:   $E (14)
  2103.                         ENDR
  2104. TRegisterProfileBlk        RECORD 0
  2105. iOpCode                     ds.w    1                ; offset: $0 (0)
  2106. iError                     ds.w    1                ; offset: $2 (2)
  2107. lReserved                 ds.l    1                ; offset: $4 (4)
  2108. hPrint                     ds.l    1                ; offset: $8 (8)
  2109. fRegisterIt                 ds.b    1                ; offset: $C (12)
  2110. filler                     ds.b    1                ; offset: $D (13)
  2111. sizeof                     EQU *                    ; size:   $E (14)
  2112.                         ENDR
  2113.     ENDIF    ; TARGET_OS_MAC
  2114.     ENDIF ; __CMAPPLICATION__ 
  2115.  
  2116.